package com.example.dllo.fragment;


import android.support.v4.app.Fragment;

/**
 * Created by dllo on 2015/12/3.
 */
public class FragmentFactory {
    public static Fragment getInstanceByIndex(int index) {
        Fragment fragment = null;
        switch (index) {

            case 1:
                fragment = new Answer_Fragment();
                break;
            case 2:
                fragment = new Rich_Fragment_TabLayout();
                break;
            case 3:
                fragment = new Answer_Fragment();
                break;
            case 4:
                fragment = new Answer_Fragment();
                break;

        }
        return fragment;
    }
}
